<Project Sdk="Microsoft.Build.Traversal">

  <ItemGroup>
    <!-- Subsets are already imported by Directory.Build.props. -->
    <ProjectReference Include="@(ProjectToBuild)" />
    <!-- Only include tasks.proj during restore and build incrementally via a target. -->
    <ProjectReference Include="$(RepoTasksDir)tasks.proj" Condition="'$(MSBuildRestoreSessionId)' != ''" />
  </ItemGroup>

  <Import Project="$(RepositoryEngineeringDir)SubsetValidation.targets" />
  <Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />

  <Target Name="BuildLocalTasks"
          BeforeTargets="Build">
    <MSBuild Projects="$(RepoTasksDir)tasks.proj"
             Targets="BuildIncrementally" />
  </Target>
</Project>
